package io.lckgroup.modules.lck.service;

import io.lckgroup.common.utils.PageUtils;
import io.lckgroup.modules.lck.entity.CustomerInfoEntity;
import io.lckgroup.modules.lck.entity.OrderDetailEntity;
import io.lckgroup.modules.lck.entity.OrderMainEntity;
import io.lckgroup.modules.lck.entity.ShopFoodEntity;
import io.lckgroup.modules.lck.form.OrderMainEntityWeixinForm;
import io.lckgroup.modules.lck.form.wxgzh.OrderDetailWxgzhForm;
import io.lckgroup.modules.lck.form.wxgzh.OrderEntityWxgzhForm;
import io.lckgroup.modules.lck.form.wxgzh.ShopFoodEntityWxgzhForm;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: OrderService
 * @Author: zhao_ag
 * @Date: 2020-03-20 10:48
 * @Version: 1.0
 */
public interface OrderService {
    /**
     * 计算订单总价
     *
     * @param foodList
     * @return
     */
    BigDecimal countOrderPrice(List<ShopFoodEntityWxgzhForm> foodList);

    //公众号插入订单
    OrderMainEntity createOrder(OrderMainEntity orderMainEntity, BigDecimal orderPrice, String orderNum, OrderEntityWxgzhForm orderEntityWxgzhForm, CustomerInfoEntity customerInfoEntity);

    //订单明细查询
    List<OrderDetailEntity> getOrderDetail(Long id);

    //    查询当前商家是否打烊
    boolean isMerchinfoOpen(Long merchinfo_id);

    /**
     * 根据用户id查询订单（按订单状态分页查询）
     *
     * @param params
     * @param customerInfoEntity
     * @return
     */
    PageUtils getOrderByState(Map<String, Object> params, CustomerInfoEntity customerInfoEntity);

    /**
     * 功能描述: <br>
     * 〈〉生成订单
     *
     * @Param: [orderMainEntity_weixin_form]
     * @Return: java.lang.String
     * @Author: 13980
     * @Date: 2020/3/9 13:33
     */
    OrderMainEntity makeOrder(OrderMainEntityWeixinForm orderMainEntity_weixin_form);

    List<OrderMainEntity> getOrderList(Long customInfoId, Long MerchantInfoId);

    List<OrderDetailWxgzhForm> getOrderDetailWxmp(Long orderMainId);

    String topayweixin(String orderId, long MerchantInfoId);

    OrderMainEntity updateOrderId(Long id, long MerchantInfoId);

    int cancelOrder(String orderNum);

    List<ShopFoodEntity> isuper(List<Long> idList);

    List<Long> getFoodIdList(Long orderID);
}
